Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support retrying failed messages for rate limit on Twilio WhatsApp #733

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

norkans7
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Apr 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.57%. Comparing base (e066c10) to head (5c4b60c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #733   +/-   ##
=======================================
  Coverage   74.57%   74.57%           
=======================================
  Files         110      110           
  Lines       13277    13280    +3     
=======================================
+ Hits         9901     9904    +3     
  Misses       2664     2664           
  Partials      712      712           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@norkans7 norkans7 requested a review from rowanseymour April 22, 2024 16:51
@@ -207,6 +208,9 @@ func (h *handler) receiveStatus(ctx context.Context, channel courier.Channel, w
}
}
clog.Error(twilioError(errorCode))
if errorCode == errorThrottled {
status = h.Backend().NewStatusUpdateByExternalID(channel, form.MessageSID, courier.MsgStatusErrored, clog)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we got rid of handlers creating status updates? This won't be used no? The sender creates the status update.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case the status is reported to use asynchronously so the handler still need set the status to error so we can retry in this case

We changed for the Send method only

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok nevermind

@rowanseymour rowanseymour merged commit 179f89d into main Apr 22, 2024
7 checks passed
@rowanseymour rowanseymour deleted the twilio-whatsapp-retry branch April 22, 2024 17:31
@github-actions github-actions bot locked and limited conversation to collaborators Apr 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants